@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

.ant-pro-global-header-layout-mix {
  .ant-pro-global-header-logo {
    width: 192px;
  }

  .ant-breadcrumb-separator {
    color: white;
  }

  .ant-breadcrumb {
    li {
      color: white;
    }

    li:last-child {
      color: floralwhite;
    }
  }
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

// logo 不可选中
#logo.ant-pro-sider-logo {
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

// 菜单文字不可选中
.ant-menu.ant-menu-root.ant-menu-inline.ant-menu-dark.ant-pro-sider-menu {
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

// 修复内嵌iframe时显示异常
.ka-wrapper {
  height: 100%;

  .ka-content {
    height: 100%;
  }
}

// input后面添加的Icon. 覆盖整个标签. 避免单击事件只在点击到 Icon本身才触发
.ant-input-group-addon {
  span:only-child::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    content: '';
  }
}

// 禁止选中文本
.none-user-select {
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: 'none';
}

// 文本省略
.text-ellips {
  overflow: hidden;
  white-space: nowrap;
  -o-text-overflow: ellipsis;
  -ms-text-overflow: ellipsis;
  text-overflow: ellipsis;
}
